<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('动态表单')"/>
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">

    <form  method="post" action="/dynamic/start">
        <input type="hidden" name="procDefId" th:value="${procDefId}"/>
        <input type="hidden" name="data"  id="data"/>
        <div class="row form-group">
            <div class="col-md-1 align-right">事项名称</div>
            <div class="col-md-7">
                <input  type="text"  name="procName" th:value="${proc.name}"
                        class="width-100 form-control"  />
            </div>

        </div>
            <!--设置隐藏域，统一处理-->
            <div class="row form-group" th:each="prop:${list}">
                <div class="col-md-1 align-right">[[${prop.name}]]</div>
                <div class="col-md-7">
                            <input  type="text" th:id="${prop.id}" th:name="${prop.id}" th:value="${prop.value}"
                                    class="width-100 form-control"  th:if="${prop.type.name=='string'}"/>
                            <div class="input-group">
                                <input  type="text" th:id="${prop.id}"  th:name="${prop.id}" th:value="${prop.value}"
                                        class="width-100 form-control date-picker-o"  th:data-date-format="${prop.type.getInformation('datePattern')}"  th:if="${prop.type.name=='date'}"/>

                                <span class="input-group-addon">
                                        <i class="fa fa-calendar bigger-110"></i>
                                    </span>
                            </div>

                            <select th:id="${prop.id}" th:name="${prop.id}" th:if="${prop.type.name=='enum'}">
                                <option value="-1">----请选择---</option>
                                    <option th:value="${item.key}" th:each="item:${prop.type.getInformation('values')}">[[${item.value}]]</option>
                            </select>

                            <input  type="checkbox" th:id="${prop.id}" th:name="${prop.id}" th:value="${prop.value}" th:if="${prop.type.name=='boolean'}"/>

                </div>
            </div>
        <div class="row form-group align-right col-md-8">
            <button class="btn btn-primary" id="startBtn">启动流程</button>
        </div>
    </form>

</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
</body>
</html>
